package com.zretc.service.impl;

import com.zretc.dao.ProductShowMapper;
import com.zretc.entity.Product;
import com.zretc.entity.Type;
import com.zretc.service.ProductShowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
/**
 * @author WHP
 */
@Service
public class ProductShowServiceImpl implements ProductShowService {

    @Autowired
    private ProductShowMapper productShowMapper;
    @Override
    public List<Product> getProductListByShellName(String shellName) {
        return productShowMapper.findBySellerName(shellName);
    }

    @Override
    public List<Product> getAllProduct() {
        return productShowMapper.findAllProduct();
    }

    @Override
    public List<Type> getAlltype() {
        return productShowMapper.findAlltype();
    }

    @Override
    public List<Product> getProductByParentId(String typeFatherId) {
        return productShowMapper.fingProductByParentId(typeFatherId);
    }

    @Override
    public Product findProductById(Integer productId) {
        return productShowMapper.getProductById(productId);
    }


}
